home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 23
/
64er_Magazin_Sonderheft_23_19xx_Markt__Technik_de_Disk_2_of_2_Side_A.d64
/
spulen berechnen
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
246 lines
10 poke53280,1:poke53281,1:print"[147]"
20 poke646,0:poke53272,23:o1=0:o2=0
50 rem ** spule (hf-drossel) **
100 gosub50000:close2:open2,0:goto1000
500 rem ** get **
510 poke198,0:wait198,1:geta$:a=val(a$):return
1000 rem ** menue **
1010 print"[147]":syssz,0,0,t$(0):syssz,0,1,t$(1):syssz,0,2,t$(2):syssz,0,3,t$(3)
1020 syssz,0,4,t$(4)
1030 syssz,3,8,"1 = [211]pule berechnen"
1040 syssz,3,10,"2 = [203]erntabelle auflisten"
1050 syssz,3,12,"3 = [196]rahttabelle auflisten"
1060 syssz,3,14,"4 = [197]rgebnis ausdrucken"
1070 syssz,3,16,"5 = [212]abellen ausdrucken"
1080 syssz,3,19,t$(8)
1100 gosub500:ifa<1ora>5then1100
1110 onagosub2000,6000,7000,55000,56000
1120 goto1010
2000 rem ** eingabe **
2010 ifm4=2then2100
2020 t1=1:l1=0:d1=0:b1=0:k1=0:a1=0:f1=0:x1=0:y1=0:m2=0:m3=0:m4=0
2100 forj=5to23:syssz,0,j,t$(7):next:syssz,2,3,"[211]pulendaten ":print
2110 syssz,1,6,"[204] in [200]enry = "l1:syssz,17,6,"";:input#2,a$:l1=val(a$)
2120 syssz,1,8,"[196] [203]ern = "d1:syssz,17,8,"";:input#2,a$:d1=val(a$)
2130 syssz,1,10,"[194] [203]ern = "b1:syssz,17,10,"";:input#2,a$:b1=val(a$)
2140 syssz,1,12,"[203]z 1-2 = "k1:syssz,17,12,"";:input#2,a$:k1=val(a$)
2150 ifk1<1ork1>2then2140
2160 syssz,1,14,"[193]l in n[200]enry = "a1:syssz,17,14,"";:input#2,a$:a1=val(a$)
2170 syssz,1,16,"f in [200]erz = "f1:syssz,17,16,"";:input#2,a$:f1=val(a$)
2180 gosub3000:return
3000 rem ** kerntabelle lesen **
3010 forj1=1to15
3020 ifq(j1,1)=d1andq(j1,2)=b1andq(j1,3)=k1thenx1=q(j1,4):y1=q(j1,5):goto3040
3030 next
3040 ifx1=0ory1=0orj1>15thensyssz,0,20,t$(10):syssz,0,21,t$(11)
3050 ifx1=0ory1=0orj1>15thensyssz,0,22,t$(12)" (j/n)":goto3070
3060 goto3090
3070 gosub500:ifa$="j"thenm4=2:gosub6000
3080 goto2100
3090 n1=sqr(l1/(1e-9*a1))
4000 rem ** ausgabe **
4010 m2=0:m4=0
4020 n5=n1:n=n5:gosub9000:ifm4=1thengoto2000
4030 e1=d3:e2=d4:na=n5:ma=m2:ra=r:ra$=r$:la=l:la$=l$:fa=fe:z3=0
4040 iff1<>0thenz3=2*(NULL)*f1*l1
4050 r=z3:gosub8200:r2=r:r2$=r$
4060 qq=z3/r9:qq=int(qq*10)/10
4070 forj=6to23:syssz,0,j,t$(7):next
4080 syssz,0,6,"[204] in [200]enry =";l1
4090 syssz,0,7,"[196] [203]ern =";d1
4100 syssz,0,8,"[194] [203]ern =";b1
4110 syssz,0,9,"[203]z 1-2 =";k1
4120 syssz,0,10,"[193]l in n[200]enry =";a1
4130 syssz,0,11,"f in [200]erz =";f1
4140 syssz,0,13,"[206] =";na
4150 ifma=0thenprinttab(24)"[145][215]indungen"
4160 ifma=1thenprinttab(24)"[145]*2 [215]ind.par."
4170 syssz,0,14,"[196] [206]ennd. =";e1;tab(24)"[195]ul"
4180 syssz,0,15,"[196] [193]ussend. =";e2;tab(24)"[195]ul"
4190 syssz,0,16,"[210][195]u =";ra;tab(24)ra$
4200 syssz,0,17,"[216]l [201]nduktanz =";r2;tab(24)r2$
4210 syssz,0,18,"[209] [211]pulenguete=";qq
4220 syssz,0,19,"f[195]u =";fa;tab(24)"[203]upferfuellfak."
4230 gosub5000:ifm4=1thenreturn
4240 gosub9080:goto4030
5000 rem ** drahtstaerke aendern **
5010 syssz,0,21,t$(13):m3=1
5020 syssz,0,23," [196]n+1=[198]1 [196]n-1=[198]3 [193]ndere [198]7 ":gosub500
5030 ifa$=chr$(13)thenm4=1:return
5040 ifa$=chr$(136)then2100
5050 ifa$=chr$(133)andj2=31andma=1thenreturn
5060 ifa$=chr$(133)thenj2=j2+1:ifj2>31thenj2=26:ma=1:goto5080
5070 goto5090
5080 d3=q1(j2,1):d4=q1(j2,2):z1=q1(j2,3):return
5090 ifa$=chr$(134)thenj2=j2-1:ifj2<26andm2=1thenj2=31:ma=0
5100 d3=q1(j2,1):d4=q1(j2,2):z1=q1(j2,3):return
6000 rem ** kerntabelle lesen **
6010 forj=5to23:syssz,0,j,t$(7):next
6020 syssz,2,3,"[203]erntabelle auflisten"
6030 syssz,1,5," [196] [203]ern [194] "," [203]z "," l/[206] "
6040 forj=1to15
6050 syssz,1,j+6,q(j,1),q(j,2),q(j,3),q(j,6)
6060 next:goto500
7000 rem ** drahttabelle lesen **
7010 forj=5to23:syssz,0,j,t$(7):next
7020 syssz,2,3,"[196]rahttabelle auflisten"
7030 syssz,2,5," [196]n "," [196]a "," [210]=[207]hm/m "
7040 forj=1to15
7050 syssz,1,j+6,q1(j,1),q1(j,2),q1(j,3):next
7060 print" weiter mit return":gosub500
7070 forj=6to23:syssz,0,j,t$(7):next
7080 forj=16to31
7090 syssz,1,j-9,q1(j,1),q1(j,2),q1(j,3)
7100 next:gosub500:return
8000 rem ** rundung von n **
8010 ny=n5-int(n5)
8020 ifny>.7thenn5=int(n5)+1:return
8030 ifny>.2thenn5=int(n5)+.5:return
8040 return
8100 rem ** formatierung von l **
8110 ifl<1e-6thenl=l*1e9:l$="n[200]":goto8150
8120 ifl<1e-3thenl=l*1e6:l$="u[200]":goto8150
8130 ifl<1thenl=l*1e3:l$="m[200]":goto8150
8140 l$="[200]"
8150 l=int(l+.5):return
8200 rem ** formatierung von r **
8210 ifr>1e6thenr=r/1e6:r$="[205][207]hm":goto8250
8220 ifr>1e3thenr=r/1e3:r$="k[207]hm":goto8250
8230 ifr>1thenr$="[207]hm":goto8250
8240 ifr>1e-3thenr=r*1e3:r$="[205]illi [207]hm"
8250 r=int(r*1000)/1000:return
9000 rem ** berechnung **
9010 d2=y1/(exp(log(n)/x1))
9020 ifd2>=1.068thend2=sqr((d2^2)/2):m2=1
9030 ifd2>=1.068thend2=1.068:j2=31
9040 forj2=1to31
9050 ifd2=<q1(j2,2)thend3=q1(j2,1):d4=q1(j2,2):z1=q1(j2,3):goto9070
9060 next
9070 n5=int((n5+.05)*10)/10:gosub8000
9080 n6=exp((log(y1/d4))*x1)
9090 fd=n5/n6:fe=int(fd*50+.5)/100:ifm2=1thenfe=fe*2
9100 z2=q(j1,6):r=(z2*n5*fd+100)/1000*z1:ifm2=1thenr=r/2
9110 r9=r:gosub8200
9120 return
50000 rem ** variablen lesen **
50010 dimq(15,7),q1(31,3),t$(15)
50100 t$(0)="[176][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
50110 t$(1)="[221] [200][211][197]-[211]oft [221] [201]nduktivitaeten berechnen [221]"
50120 t$(2)="[171][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]
50130 t$(3)[178]"(NULL) (NULL)"
50140 t$(4)[178]"/tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp
50150 t$(5)="[211]pule"
50160 t$(6)="[213]ebertrager"
50170 t$(7)=" "
50180 t$(8)="[194]itte waehlen:"
50190 t$(9)="[194]itte gewuenschte nummer eintippen"
50200 t$(10)="[203]erndaten nicht gef."
50210 t$(11)="[194]itte [206]eueingabe"
50220 t$(12)="[203]erndaten auflisten ?"
50230 t$(13)="[197]ingabe aendern ? (nein [210][197][212][213][210][206])"
51000 rem ** kerndaten **
51100 forj=1to15
51200 forw=1to7
51205 readw1
51210 q(j,w)=w1:next
51220 next
51400 data9,5,1,1.882,1.8565,18.5,10,11,7,1,1.836,2.3654,22,16,11,7,2,1.839
51420 data 2.5075,22,16,14,8,1,1.828,3.0292,28,25,14,8,2,1.832,3.2114,28,25
51430 data 18,11,1,1.839,3.8683,35.6,44
51440 data 18,11,2,1.861,4.1204,35.6,44,22,13,1,1.848,5.3375,44,63
51450 data 22,13,2,1.825,5.9283,44,63
51460 data 26,16,1,1.849,6.3362,52,94,26,16,2,1.834,6.9018,52,94
51470 data 30,19,1,1.835,7.8774,60,136
51480 data 30,19,2,1.831,8.5916,60,136,36,22,1,1.827,9.1729,73,201
51490 data 36,22,2,1.824,10.0917,73,201
52000 rem ** drahttabelle **
52100 forj=1to31
52200 forw=1to3
52205 readw1
52210 q1(j,w)=w1:next
52220 next
52400 data .032,.04,21.44,.04,.05,13.72,.05,.062,8.781,.063,.078,5.531
52420 data .071,.088,4.355,.08,.098,3.43,.09,.11,2.71,.1,.121,2.195
52440 data .112,.134,1.75,.125,.149,1.405,.14,.166,1.12,.16,.187,.8575
52460 data .18,.209,.6775,.2,.23,.5488,.224,.256,.4375,.25,.284,.3512
52480 data .28,.315,.28,.315,.352,.2212,.355,.395,.1742,.4,.442,.1372
52500 data .45,.495,.1084,.5,.548,.08781,.56,.611,.07,.63,.684,.05531
52520 data .71,.767,.04355,.75,.809,.03903,.8,.861,.0343,.85,.913,.03038
52540 data .9,.965,.0271,.95,1.017,.02432,1,1.068,.02195
53000 rem ** spalte und zeile **
53010 x=0:fori=52216to52243:reada:pokei,a:x=x+a:next
53020 ifx<>3662thenprint"data-fehler!":stop
53030 sz=52216:goto54000
53040 data32,253,174,32,158,183,138,72,32,253,174,32,158,183,104,168,24,32,240
53050 data255,32,253,174,76,164,170,96,
54000 rem ** bidschirmfarbe **
54010 i=15:j=0
54020 poke53280,i:poke53281,i:poke646,j
54030 print"[147]";t$(0);t$(1);t$(2);t$(3);t$(4)
54040 syssz,8,3," [194]ildschirmfarbe waehlen "
54050 syssz,6,8,"[194]itte [194]ildschirmfarbe mit"
54060 syssz,6,10,"den [195][213][210][211][207][210]-[212]asten waehlen":syssz,6,12,i;j
54070 gosub500
54080 ifa$=chr$(17)theni=i+1:ifi>15theni=0
54090 ifa$=chr$(17)then54020
54100 ifa$=chr$(145)theni=i-1:ifi<0theni=15
54110 ifa$=chr$(145)then54020
54120 ifa$=chr$(29)thenj=j+1:ifj>7thenj=0
54130 ifa$=chr$(29)then54020
54140 ifa$=chr$(157)thenj=j-1:ifj<0thenj=7
54150 ifa$=chr$(157)then54020
54160 ifa$=chr$(13)thenpoke52214,i:poke52214,i:poke52215,j:return
54170 goto54070
54180 return
55000 rem ** drucken **
55010 syssz,3,3,"[196]rucken"
55100 close1:open1,4,7:gosub55350
55110 print#1,chr$(14)spc(6)"[211]pule ([200]f-[196]rossel) * [197]ingabe"
55120 gosub55350
55130 print#1,chr$(15)spc(12)"[204] in [200]enry =";l1
55140 print#1,chr$(15)spc(12)"[196] [203]ern-[196]urchm. =";d1
55150 print#1,chr$(15)spc(12)"[194] [203]ern-[194]reite =";b1
55160 print#1,chr$(15)spc(12)"[203]z 1-2 [203]ammer =";k1
55170 print#1,chr$(15)spc(12)"[193]l in n[200]enry =";a1
55180 print#1,chr$(15)spc(12)"f in [200]erz =";f1
55190 print#1:gosub55350
55200 print#1,chr$(14)spc(6)"[211]pule ([200]f-[196]rossel) * [193]usgabe"
55210 gosub55350
55240 print#1,chr$(15)spc(12)"[206] =";na;
55250 ifma=0thenprint#1,chr$(15)chr$(16)chr$(51)chr$(50)"[215]indungen"
55260 ifma=1thenprint#1,chr$(15)chr$(16)chr$(51)chr$(50)"2 [215]ind. parallel"
55270 print#1,chr$(15)spc(12)"[196] [206]enn. =";e1;chr$(16)chr$(51)chr$(50)"[195]ul"
55280 print#1,chr$(15)spc(12)"[196] [193]uss. =";e2;chr$(16)chr$(51)chr$(50)"[195]ul"
55290 print#1,chr$(15)spc(12)"[210][195]u =";ra;chr$(16)chr$(51)chr$(50)ra$
55300 print#1,chr$(15)spc(12)"[216]l [201]nduktanz =";r2;chr$(16)chr$(51)chr$(50)r2$
55310 print#1,chr$(15)spc(12)"[209] [211]pulenguete =";qq;chr$(16)chr$(51)chr$(50)r2$
55320 print#1,chr$(15)spc(12)"f[195]u =";fa;
55330 print#1,chr$(16)chr$(51)chr$(50)"[203]upferfuellfaktor":print#1:gosub55350
55340 o2=0:print#1:print#1:close1:return
55350 print#1,chr$(15)spc(12);:fori=1to56:print#1,"-";:next:print#1:return
56000 rem ** drucken **
56100 close1:open1,4,7
56110 gosub56450:print#1,chr$(14)spc(4)"[203]erntabelle":gosub56450
56120 print#1,chr$(15)spc(8)"[196]-[203]ern";
56130 print#1,chr$(16)chr$(49)chr$(54)"[194]-[203]ern";chr$(16)chr$(50)chr$(52)"[203]z";
56140 print#1,chr$(16)chr$(51)chr$(50)"[216]1";chr$(16)chr$(52)chr$(48)"[217]1";
56150 print#1,chr$(16)chr$(53)chr$(52)"[204]n";chr$(16)chr$(54)chr$(50)"[193]e"
56160 print#1
56200 forj=1to15:print#1,chr$(15)spc(8);
56210 print#1,q(j,1);chr$(16)chr$(49)chr$(54)q(j,2);
56220 print#1,chr$(16)chr$(50)chr$(52)q(j,3);chr$(16)chr$(51)chr$(50)q(j,4);
56230 print#1,chr$(16)chr$(52)chr$(48)q(j,5);chr$(16)chr$(53)chr$(52)q(j,6);
56240 print#1,chr$(16)chr$(54)chr$(50)q(j,7)
56250 next
56300 gosub56450:print#1:print#1:print#1
56310 gosub56450:print#1,chr$(14)spc(4)"[196]rahttabelle":gosub56450
56320 print#1,chr$(15)spc(8)"[196]-[206]enn";
56330 print#1,chr$(16)chr$(50)chr$(48)"[196]-[193]ussen";
56340 print#1,chr$(16)chr$(51)chr$(50)"[210] [207]hm/m":print#1
56400 forj=1to31:print#1,chr$(15)spc(8);
56410 print#1,q1(j,1);chr$(16)chr$(50)chr$(48)q1(j,2);
56420 print#1,chr$(16)chr$(51)chr$(50)q1(j,3)
56430 next:gosub56450
56440 print#1:close1:return
56450 print#1,chr$(15)spc(8);:fori=1to60:print#1,"-";:next:print#1:return